import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class Test06 extends StatefulWidget {
  @override
  _Test06State createState() => _Test06State();
}

class _Test06State extends State<Test06> {
  var groupValue;

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Row(
        children: [
          Flexible(
              child: RadioListTile(
                  title: Text("语文"),
                  value: "语文",
                  groupValue: groupValue,
                  onChanged: (value) {
                    setState(() {
                      groupValue = value;
                    });
                  })),
          Flexible(
              child: RadioListTile(
                  title: Text("数学"),
                  value: "数学",
                  groupValue: groupValue,
                  onChanged: (value) {
                    setState(() {
                      groupValue = value;
                    });
                  })),
          Flexible(
              child: RadioListTile(
                  title: Text("英语"),
                  value: "英语",
                  groupValue: groupValue,
                  onChanged: (value) {
                    setState(() {
                      groupValue = value;
                    });
                  })),
        ],
      ),
    );
  }
}
